package co.msk8.server.calculator;

import co.msk8.server.calculator.impl.IterativeCalculator;
import co.msk8.server.calculator.impl.SimpleCalculator;

public class CalculatorFactory {

	public enum CalculatorType {
		
		SIMPLE,
		ITERATIVE,
		;
	}
	
	public static Calculator createCalculator(CalculatorType type) {
		
		switch (type) {
		case SIMPLE:
			return new SimpleCalculator();
		case ITERATIVE:
			return new IterativeCalculator();
		default:
			return new SimpleCalculator();
		}
	}
}
